<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class CourseModel extends Model
{
    protected $table = 'course';
    protected $guarded = [];
    public $timestamps = false;

    public function courseArrange() {
        return $this->hasMany(CourseArrangeModel::class, 'course_id', 'id');
    }

    public function level(){
        return $this->hasManyThrough(
            LevelModel::class,
            CoursePriceModel::class,
            'course_id',
            'id',
            'id',
            'level_id'
        );
    }



}